<template>
    <div class="order-list">
        <!-- <Order v-for="(item,i) in orderList" :orderItem="item" />
         -->
         <Order />
         <Order />
         <Order />
         <Order />
    </div>
</template>

<script>
    import Order from '../components/Order.vue'
    export default {
        name: 'OrderList',
        components: {
            Order
        },
        props: {
            order: {
                type: Object
            }
        },
        data() {
            return {
                // orderList: [
                //     { id: 0, name: "name", price: 1, date: "", num: 0, },
                //     { id: 0, name: "name", price: 2, date: "", num: 0, },
                //     { id: 0, name: "name", price: 3, date: "", num: 0, },
                //     { id: 0, name: "name", price: 4, date: "", num: 0, },
                // ]
                orderList:[{ id: 0, name: "name", price: 1, date: "", num: 0, },]
            }
        },
        mounted() {
            this.orderList.push(this.order)
            console.log(this.order);
        },
        computed:{

        }
    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.order-list{
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    /* padding-bottom: 5px; */
    background: #eee;
}
</style>